package cn.edu.nuaa.model;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName book
 */
public class Book implements Serializable {
    /**
     *
     */
    private Long bookId;

    /**
     *
     */
    private String bookName;

    /**
     *
     */
    private String bookIsbn;

    /**
     * 出版社
     */
    private String bookPress;

    /**
     * 作者
     */
    private String bookAuthor;

    /**
     * 总页数
     */
    private Integer bookPagination;

    /**
     * 价格
     */
    private Double bookPrice;

    /**
     *
     */
    private Date bookUploadTime;

    /**
     * 1可借，2已借，3归还，4下架
     */
    private Integer bookStatus;

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public Long getBookId() {
        return bookId;
    }

    /**
     *
     */
    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }

    /**
     *
     */
    public String getBookName() {
        return bookName;
    }

    /**
     *
     */
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    /**
     *
     */
    public String getBookIsbn() {
        return bookIsbn;
    }

    /**
     *
     */
    public void setBookIsbn(String bookIsbn) {
        this.bookIsbn = bookIsbn;
    }

    /**
     * 出版社
     */
    public String getBookPress() {
        return bookPress;
    }

    /**
     * 出版社
     */
    public void setBookPress(String bookPress) {
        this.bookPress = bookPress;
    }

    /**
     * 作者
     */
    public String getBookAuthor() {
        return bookAuthor;
    }

    /**
     * 作者
     */
    public void setBookAuthor(String bookAuthor) {
        this.bookAuthor = bookAuthor;
    }

    /**
     * 总页数
     */
    public Integer getBookPagination() {
        return bookPagination;
    }

    /**
     * 总页数
     */
    public void setBookPagination(Integer bookPagination) {
        this.bookPagination = bookPagination;
    }

    /**
     * 价格
     */
    public Double getBookPrice() {
        return bookPrice;
    }

    /**
     * 价格
     */
    public void setBookPrice(Double bookPrice) {
        this.bookPrice = bookPrice;
    }

    /**
     *
     */
    public Date getBookUploadTime() {
        return bookUploadTime;
    }

    /**
     *
     */
    public void setBookUploadTime(Date bookUploadTime) {
        this.bookUploadTime = bookUploadTime;
    }

    /**
     * 1可借，2已借，3归还，4下架
     */
    public Integer getBookStatus() {
        return bookStatus;
    }

    /**
     * 1可借，2已借，3归还，4下架
     */
    public void setBookStatus(Integer bookStatus) {
        this.bookStatus = bookStatus;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Book other = (Book) that;
        return (this.getBookId() == null ? other.getBookId() == null : this.getBookId().equals(other.getBookId()))
            && (this.getBookName() == null ? other.getBookName() == null : this.getBookName().equals(other.getBookName()))
            && (this.getBookIsbn() == null ? other.getBookIsbn() == null : this.getBookIsbn().equals(other.getBookIsbn()))
            && (this.getBookPress() == null ? other.getBookPress() == null : this.getBookPress().equals(other.getBookPress()))
            && (this.getBookAuthor() == null ? other.getBookAuthor() == null : this.getBookAuthor().equals(other.getBookAuthor()))
            && (this.getBookPagination() == null ? other.getBookPagination() == null : this.getBookPagination().equals(other.getBookPagination()))
            && (this.getBookPrice() == null ? other.getBookPrice() == null : this.getBookPrice().equals(other.getBookPrice()))
            && (this.getBookUploadTime() == null ? other.getBookUploadTime() == null : this.getBookUploadTime().equals(other.getBookUploadTime()))
            && (this.getBookStatus() == null ? other.getBookStatus() == null : this.getBookStatus().equals(other.getBookStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBookId() == null) ? 0 : getBookId().hashCode());
        result = prime * result + ((getBookName() == null) ? 0 : getBookName().hashCode());
        result = prime * result + ((getBookIsbn() == null) ? 0 : getBookIsbn().hashCode());
        result = prime * result + ((getBookPress() == null) ? 0 : getBookPress().hashCode());
        result = prime * result + ((getBookAuthor() == null) ? 0 : getBookAuthor().hashCode());
        result = prime * result + ((getBookPagination() == null) ? 0 : getBookPagination().hashCode());
        result = prime * result + ((getBookPrice() == null) ? 0 : getBookPrice().hashCode());
        result = prime * result + ((getBookUploadTime() == null) ? 0 : getBookUploadTime().hashCode());
        result = prime * result + ((getBookStatus() == null) ? 0 : getBookStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bookId=").append(bookId);
        sb.append(", bookName=").append(bookName);
        sb.append(", bookIsbn=").append(bookIsbn);
        sb.append(", bookPress=").append(bookPress);
        sb.append(", bookAuthor=").append(bookAuthor);
        sb.append(", bookPagination=").append(bookPagination);
        sb.append(", bookPrice=").append(bookPrice);
        sb.append(", bookUploadTime=").append(bookUploadTime);
        sb.append(", bookStatus=").append(bookStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
